import type {
  FindBannerType,
  FindGoodsType,
  FindHotType,
  FindNewType,
  FindSpecialType,
  HotBrandType
} from '@/types/home'
import { request } from '@/utils/request'

// 请求热门品牌
export const findBrand = (limit?: string) => {
  return request<HotBrandType[]>('/home/brand', 'get', {
    limit
  })
}

//  获取广告图
export const findBanner = () => {
  return request<FindBannerType[]>('/home/banner', 'get')
}

// 获取新鲜好物数据
export const findNew = () => {
  return request<FindNewType[]>('home/new', 'get')
}

// 获取人气推荐数据
export const findHot = () => {
  return request<FindHotType[]>('home/hot', 'get')
}

// 获取产品区域数据
export const findGoods = () => {
  return request<FindGoodsType[]>('home/goods', 'get')
}
// 最新专题数据
export const findSpecial = () => {
  return request<FindSpecialType[]>('home/special', 'get')
}
